projects
/
project
/
udebug.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9ec5fbb
)
ring: add debug messages for ring alloc errors
author
Felix Fietkau
<
[email protected]
>
Thu, 30 Nov 2023 09:02:47 +0000
(10:02 +0100)
committer
Felix Fietkau
<
[email protected]
>
Thu, 30 Nov 2023 09:10:21 +0000
(10:10 +0100)
Signed-off-by: Felix Fietkau <
[email protected]
>
ring.c
patch
|
blob
|
history
diff --git
a/ring.c
b/ring.c
index 81f341f4a4bcda394b92a6641fc078bd60281ffb..4adcfda6cbf82423e700961fcdd2e2fbe2dbdc85 100644
(file)
--- a/
ring.c
+++ b/
ring.c
@@
-44,8
+44,10
@@
struct client_ring *client_ring_alloc(struct client *cl)
struct client_ring *r;
size_t meta_len;
- if (cl->rx_fd < 0)
+ if (cl->rx_fd < 0) {
+ DC(2, cl, "missing file descriptor");
return NULL;
+ }
meta_len = blob_pad_len(&cl->rx_buf.data);
r = calloc_a(sizeof(*r), &meta, meta_len);
@@
-53,6
+55,7
@@
struct client_ring *client_ring_alloc(struct client *cl)
blobmsg_parse_attr(policy, __RING_ATTR_MAX, tb, meta);
if (!tb[RING_ATTR_NAME]) {
+ DC(2, cl, "missing ring name");
close(cl->rx_fd);
free(r);
return NULL;